<?php

$db['office']=array (
    'columns' =>
    array (
        'office_id' =>
        array (
            'type' => 'int unsigned',
            'required' => true,
            'pkey' => true,
            'extra' => 'auto_increment',
            'editable' => false,
            'comment' => app::get('ectools')->_('办事处序号'),
        ),
        'local_name' =>
        array (
            'type' => 'varchar(50)',
            'required' => true,
            'default' => '',
            'label'=>app::get('ectools')->_('办事处名称'),
            'width'=>100,
            'default_in_list'=>true,
            'in_list'=>true,
            'editable' => false,
        ),
        'default_local' =>
         array (
            'type' => 'intbool',
            'default' => '0',
            // 'required' => true,
            'label' => app::get('ectools')->_('是否默认'),
            'width' => 110,
            'editable' => false,
            'in_list' => true,
            'default_in_list' => true,
        ),
        'limited_amount' =>
        array (
            'type' => 'int(10)',
            'default' => '0',
            'label' => app::get('ectools')->_('限制最低金额'),
            'required' => false,
            'width' => 110,
            'filtertype' => 'number',
            'editable' => true,
            'in_list' => true,
        ),
        'package' =>
        array (
            'type' => 'varchar(20)',
            'required' => true,
            'default' => '',
            'label'=>app::get('ectools')->_('数据包'),
            'width'=>100,
            'default_in_list'=>true,
            'in_list'=>true,
            'editable' => false,
            'comment' => app::get('ectools')->_('地区包的类别, 中国/外国等. 中国大陆的编号目前为mainland'),
        ),
        'p_office_id' =>
        array (
            'type' => 'int unsigned',
            'editable' => false,
            'comment' => app::get('ectools')->_('上一级办事处的序号'),
        ),
        'office_path' =>
        array (
            'type' => 'varchar(255)',
            'width'=>300,
            'editable' => false,
            'comment' => app::get('ectools')->_('序号层级排列结构'),
        ),
        'office_grade' =>
        array (
            'type' => 'number',
            'editable' => false,
            'comment' => app::get('ectools')->_('办事处层级'),
        ),
        'p_1' =>
        array (
            'type' => 'varchar(50)',
            'editable' => false,
            'comment' => app::get('ectools')->_('额外参数1'),
        ),
        'p_2' =>
        array (
            'type' => 'varchar(50)',
            'editable' => false,
            'comment' => app::get('ectools')->_('额外参数2'),
        ),
        'ordernum' =>
        array (
            'type' => 'number',
            'editable' => true,
            'comment' => app::get('ectools')->_('排序'),
        ),
        'disabled' =>
        array (
            'type' => 'bool',
            'default' => 'false',
            'editable' => false,
        ),
    ),
    'index' => 
  array (
    'ind_p_office_id' =>
    array (
        'columns' =>
        array (
          0 => 'p_office_id',
          1 => 'office_grade',
          2 => 'local_name',
        ),
        'prefix' => 'unique',
    ),
  ),
    'comment' => app::get('ectools')->_('办事处表'),
);
